<?php $this->load->view("common/header") ?>
<body>
  <div id="page_wrapper">
<?php $this->load->view("common/speel") ?>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td  align="left" valign="top"><?php $this->load->view("nav/main") ?></td>
      <td width="1265" valign="top" id="mainContent">
      <div id="crum">
<?php echo $crum ?>
</div><br>

      <form name="form1" id="form_newJob" method="post" action="<?php echo base_url() ."job/newjob/" ?>">

          <table width="600" border="0" align="left" cellpadding="3" cellspacing="3">
            <tr>
              <td class="tbl_header" colspan="3">Add a new Job</td>
              
            </tr>
            <tr>
              <td colspan="3"><span class="pageMsg"><?php echo $msg ?></span></td>
            </tr>
            <tr>
              <td width="130" class="tbl_field_lable">Client</td>
              <td colspan="2" class="tbl_field_input"><select name="company_id" id="company_id" style="float:left">
              <option value="0">Select Client</option>
              <option value="-1">COD</option>
                <?php foreach($companies as $company){ ?>
                <option value="<?php echo $company['id'] ?>"><?php echo $company['company_name']?></option>
                <?php } ?>
              </select>
              <div id="cod_client" style="float:left;margin-left:10px;"></div></td>
            </tr>
            <tr>
              <td valign="top" class="tbl_field_lable">Job Subject</td>
              <td colspan="2" valign="top" class="tbl_field_input"><textarea name="job_subject" cols="50" rows="3" id="job_subject"></textarea></td>
            </tr>
            <tr>
              <td valign="top" class="tbl_field_lable">Description</td>
              <td colspan="2" valign="top" class="tbl_field_input"><textarea name="job_description" cols="50" rows="5" id="job_description"></textarea></td>
            </tr>
            <tr>
              <td valign="top" class="tbl_field_lable">Notes<br>
              <span id="job_date_lbl">
              <?php echo date("d/m/Y H:i:s") ?></span></td>
              <td colspan="2" valign="top" class="tbl_field_input"><textarea name="job_notes" cols="50" rows="3" id="job_notes"></textarea></td>
            </tr>
            <tr>
              <td valign="top" class="tbl_field_lable">Type</td>
              <td colspan="2" valign="top" class="tbl_field_input"><select name="job_type" id="job_type">
                <?php foreach($job_types as $type){ ?>
                <option value="<?php echo $type['lu_value'] ?>"><?php echo $type['lu_lable']?></option>
                <?php } ?>
              </select></td>
            </tr>
            <tr>
              <td valign="top" class="tbl_field_lable">Pirority</td>
              <td colspan="2" valign="top" class="tbl_field_input"><select name="job_pri" id="job_pri">
                <?php foreach($job_pri as $pri){ ?>
                <option value="<?php echo $pri['lu_value'] ?>"><?php echo $pri['lu_lable']?></option>
                <?php } ?>
              </select></td>
            </tr>

            <tr>
              <td valign="top" class="tbl_field_lable">Job Start</td>
              <td width="197" valign="top" class="tbl_field_input"><input name="job_start_date" type="text" id="job_start_date" size="20" value="" data="<?php echo date("Y-m-d") ?>">
              <input type="hidden" name="job_start_date_h" id="job_start_date_h"></td>
              <td width="243" valign="top" class="tbl_field_input">
              <select name="job_start_time_hr" id="job_start_time_hr">
              <?php echo gen_time_dropdown() ?>
              </select>
              : 
              <select name="job_start_time_min" id="job_start_time_min">
                <?php echo gen_time_dropdown('min') ?>
              </select></td>
            </tr>
            <tr>
              <td valign="top" class="tbl_field_lable">Job End</td>
              <td valign="top" class="tbl_field_input"><input name="job_end_date" type="text" id="job_end_date" size="20"  value="<?php echo date("Y-m-d") ?>">
              <input type="hidden" name="job_end_date_h" id="job_end_date_h"></td>
              <td valign="top" class="tbl_field_input"><select name="job_end_time_hr" id="job_end_time_hr">
              <?php echo gen_time_dropdown() ?>
              </select>
                :
                <select name="job_end_time_min" id="job_end_time_min">
                  <?php echo gen_time_dropdown('min') ?>
                </select></td>
            </tr>
            <tr>
              <td><input name="action" type="hidden" id="action" value="newJob">
              <input name="job_logged" type="hidden" id="job_logged" value="<?php echo date("Y-m-d H:i",now()) ?>"></td>
              <td colspan="2" class="tbl_field_input"><input name="button" type="submit" class="tblBtn" id="btn_newJob" value=" Add Job  "></td>
            </tr>
          </table>
        
      </form></td>
    </tr>
</table>

<?php $this->load->view("common/footer") ?>
</div>
</body>
</html>
